<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@include file="inc/head.jsp" %>

<div class="main">
    <div class="leftmain">
        <!--面包屑-->
        <div class="breadcrumb gezidi">
            <b>当前位置：</b>&nbsp;&nbsp;<a><b>首页</b></a> > <span class="last">下载列表</span>
        </div>
        <!--面包底屑-->
        <div class="xiazaiall">
            <table class="xiazailietb" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <th>文件名</th>
                    <th>文件大小</th>
                    <th>下载次数</th>
                    <th>上传时间 ↑</th>
                    <th>操作</th>
                </tr>

                <c:forEach var="file" items="${files}" varStatus="status">
                    <c:if test="${status.first}">
                        <tr class="firstxizai">
                    </c:if>
                    <c:if test="${status.index%2==1}">
                        <tr class="gay">
                    </c:if>
                    <c:if test="${status.index%2==0 and !status.first}">
                        <tr>
                    </c:if>
                        <td><span class="xiazainame">${file.fileName}</span></td>
                        <td>${file.fileSize}</td>
                        <td>${file.downloadCount}</td>
                        <td>${file.publishDate}</td>
                        <td>
                       <span class="xaizaianiu">
                           <c:if test="${(not empty file.accessPermission) and (file.accessPermission eq 1)}">
                               <a href="#" onclick="checkDownloadMemberCode('/downloads/resourceFile/${file.id}/${file.fileName}')">下载</a>
                           </c:if>
                           <c:if test="${file.accessPermission ne 1}">
                               <a href="/downloads/resourceFile/${file.id}/${file.fileName}" target="_download_frame">下载</a>
                           </c:if>
                        </span>
                        </td>
                    </tr>
                </c:forEach>
            </table>
        </div>
        <iframe id="_download_frame" name="_download_frame" src="about:blank" height="0" width="0" style="display:none"></iframe>
        <!--左边到底-->
    </div>
    <div class="rightmain">
        <%@include file="inc/right.jsp" %>
    </div>
    <script type="text/javascript">
        function checkDownloadMemberCode(downloadUrl) {
//            document.getElementById("_member_link_url").value=downloadUrl
            ShowMsg.Show('提示信息框');
            $("#_member_link_url").val(downloadUrl);
            $("#_member_link_target").val("_download_frame");
        }
    </script>
</div>
<%@include file="inc/footer.jsp" %>
